package com.gp.study.mybatis;

import java.lang.reflect.Proxy;
import java.util.ResourceBundle;

public class GpConfigurattion {
	
	public static final ResourceBundle sqlMappings;
	
	static{
		sqlMappings = ResourceBundle.getBundle("mysql");
	}

	public <T> T getMapper(Class<?> clz,GpSqlSession sqlSession) {
		//需要一个真实地处理调用的InnovationHandler
		GpMapperProxy proxy = new GpMapperProxy(sqlSession);
		return (T) Proxy.newProxyInstance(this.getClass().getClassLoader(),new Class<?>[]{clz}, proxy);
	}
	
	

}
